package com.cyl.manager.ums.domain.vo;

import java.time.LocalDateTime;

import com.cyl.manager.ums.domain.entity.Member;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.entity.SysDept;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * 会员信息 数据视图对象
 * 
 * @author zcc
 */
@Data
public class MemberOutVO  {
	
	 public MemberOutVO() {
			super();
		}
	
   public MemberOutVO(Member m,SysDept d) {
		super();
		this.id = m.getId();
		this.nickname = m.getNickname();
		this.createTime = m.getCreateTime();
		this.remark = m.getRemark();
		this.mark = m.getMark();
		Integer r = m.getRolezd();
		
		if(r!=null && d!=null) {
			int ro = r.intValue();
			if(ro == 0) {
				this.rolezdName = "普通用户";
			}
			if(ro == 1) {
				this.rolezdName = "核销员";
			}
			if(ro == 2) {
				this.rolezdName = "店长";
			}
			if(ro == 3) {
				this.rolezdName = "副店长";
			}
			if(ro == 4) {
				this.rolezdName = "群主";
			}
		}
		if(d!=null) {
			this.deptId = d.getDeptId();
			this.deptName = d.getDeptName();
			this.leader = d.getLeader();
			this.phone = d.getPhone();
			this.province = d.getProvince();
			this.city = d.getCity();
			this.district = d.getDistrict();
			this.address = d.getAddress();
			this.deptCreateTime = d.getCreateTime();
		}
		
	}

/** ID */
	@Excel(name = "用户id")
    private Long id;
   /** 昵称 */
    @Excel(name = "用户昵称")
    private String nickname;
    
    @Excel(name = "用户注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    
    
    @Excel(name = "用户角色")
    private String rolezdName;
    
    @Excel(name = "前端会员身份")
    private String mark;
    
    @Excel(name = "店铺ID")
    private Long deptId;
    
    @Excel(name = "店铺名称")
    private String deptName;

    @Excel(name = "店铺收货人")
    private String leader;

    @Excel(name = "店铺收货人电话")
    private String phone;
    
    @Excel(name = "店铺省份/直辖市")
    private String province;
    @Excel(name = "店铺城市")
    private String city;
    @Excel(name = "店铺区")
    private String district;
    
    @Excel(name = "店铺收货地址")
    private String address;
    
    @Excel(name = "店铺创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deptCreateTime;
     
    @Excel(name = "备注")
    private String remark;
    
    
 
   
     
}
